// pages/contact_us/contact_us.js
var utils = require('../../utils/util.js');
var httpUrl = getApp().globalData.httpUrl;
var codeName = getApp().globalData.codeName;
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that=this;
    wx.setNavigationBarTitle({
      title: options.typename,
    })
    utils.http(httpUrl +"uslist",{
      code:codeName,
      modelid:options.id
    },function(res){
        console.log(res)
        that.setData({
          dataList: res.dataList[0]
        })
    })
  },

  oNphoneTap:function(e){
    var phone=e.currentTarget.dataset.phone;
    wx.makePhoneCall({
      phoneNumber: phone //仅为示例，并非真实的电话号码
    })
  }
})